﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace wlog.Shell.IO
{
    public class HelpCommand : Command
    {
        public override void Setup(string[] args)
        {
            CommandArgs = args;
            this.CommnadName = CommandController.INVALIDCOMMAND;
            Results.Add("Help");
            Results.WriteLine("================================================================================");
            Results.Add("Please see , the usage details here !!");
            Results.WriteLine("================================================================================");
            Results.Add("");
            base.CreateTask(() =>
            {
                Results.Add("LS << show all varialbles, should show the current directory.");
                Results.Add("");
                Results.Add("create [table/queue/blob] [tablename/queuename/blobcontainername] << create the storage with specified name.");
                Results.Add("");
                Results.Add("list [table/queue/blob] << shows the storages which available on the account.");
                Results.Add("");
                Results.Add("put or add [table/queue/blob] [tablename/queuename/blobcontainername]  [location=file/http] [uri=filePath to content] << create the storage with specified name add content to it, it will read from uri and upload it.");
                Results.Add("");
                Results.Add("get [table/queue/blob] [tablename/queuename/blobcontainername] [location=file/http] [uri=filePath to content] << read the storage with specified name and write the content at specified uri");
                Results.Add("");
                Results.Add("select [table] [tablename] [columns=*/comma_separated_columnnames] [location=file/http/console] [format=xlsx/text/xml] [uri=filePath to content] << select columns from table and writes to uri with given format. It writes into excel file with xlsx format.");
                Results.Add("");
                Results.Add("upload [blob] [blobcontainername] [name=blobname] [location=file/http] [uri=filePath to content] [async=true] << uploads file from uri to specified blob in the given container asynchronously.");
                Results.Add("");
                Results.Add("peek [queue] [queuename] [location=file/http] [uri=filePath to content]<< read the queue with specified name and write the content at specified uri, but will not delete the message");
            });
        }
    }
}
